
##########################################
###########==-- ABOUT --==################
##########################################

  Stereo Box - v1.0
  ~~~~~~~~~~
                    by: Mark Turner (Rymix) 
                 email: coder@rymix.net
                   www: www.rymix.net

  A stereo field manipulator
  Similar to the Waves StereoImager (DX)
  or PSP StereoControl (VST)

  1.1% max cpu on pIII/700

##########################################
##########==-- CONTROLS --==##############
##########################################

----------------------------------
  Parameters:
----------------------------------

* Gain
   - Increases/decreases the input gain. Gain is from 0% to 200%

* Width
   - Expands/shrinks the stereo field. Max is from 0% (mono) to 300%
     No effect on mono sounds.

* LRBalance
   - A "typical" left/right balance control. 
     Shifts sound from full left channel to full right channel.
     This balance control is not linear-gain (i.e., the overall
     gain changes across the parameter range)
     
* Center Axis
   - Balance control for the monophonic "center" part of the sound. 
     Rotates the center axis -45 to +45 degrees, keeping the stereo
     information intact. Also known as center asymmetry.
     Acts as a linear-gain typical balance control on mono sounds. (i.e.,
     the overall gain does not change across the parameter range)

* Stereo Axis
   - Balance control for the stereo part of the sound. 
     Rotates the stereo axis -45 to +45 degrees, keeping the center
     information intact. Also known as asymmetry or stereo asymmetry.
     No effect on mono sounds
     (* the stereo axis control is inverted)

* Rotation
   - Rotates both the center axis and stereo axis together, from
     -45 to +45 degrees.
     Acts as a linear-gain typical balance control on mono sounds.

----------------------------------
  Attributes:
----------------------------------

* Sub-Tick resolution - Determines how often (in samples) the anticlick
                        routine is triggered. Lower values = finer 
			resolution = much more CPU.
                        Default is every 32 samples.
* Anticlick strength - Value to reduce clicking on parameter changes. 
                       Parameters will slide quickly from the old value
                       to the new value on every subtick (define above).
                       The strength value defines a maximum percentage of
                       change the value can make on each subtick until it
                       reaches the target value. Higher values = better
                       anticlick = longer sliding = more cpu.
                       Default is 80.  

##########################################
############==-- USAGE --==###############
##########################################

 The following diagram resembles an audio vector/phase scope.
 (And no, a vectorscope is not a symbol of peace =)
 The top half of the graph resembles the control display of 
 the Waves StereoImager DX plugin. The full graph is a 360
 degree circle that represents channel and phase information
 in an audio signal.
                                   
                               (C)  [0 degrees]
----------------------------------------------------------------
--------------------------##############------------------------
-----------------------#####----##-----####---------------------
---------------------####-------##--------###-------------------
--------[-45] (L)--###----------##----------###--(R) [45 deg]--- C = Center Channel
------------------##############################----------------
-----------------####-----------##----------#####--------------- S = Stereo Channel
----------------##--###---------##---------###--##--------------
---------------##-----##--------##--------##-----##------------- L = Left Channel
--------------###------##-------##------###-------##------------
--------------##--------###-----##-----###---------#------------ R = Right Channel
--------------#-----------##----##----##-----------##-----------
-------------##------------##---##--###------------##-----------
-------------#--------------###-##-###--------------#-----------
-------------#----------------######----------------#-----------
--[-90] (S) -########################################- (-S) [90]
-------------########################################-----------
-------------#------------------##------------------#-----------
-------------##-----------------##------------------#-----------
-------------##-----------------##-----------------##-----------
--------------#-----------------##-----------------##-----------
--------------##----------------##----------------##------------
---------------##---------------##----------------##------------
---------------##---------------##---------------##-------------
----------------##--------------##--------------##--------------
-----------------###------------##-------------##---------------
------------------###-----------##-----------###----------------
--------------------###---------##----------###-----------------
-------------(-R)----####-------##-------####----(-L)-----------
------------------------#####---##----#####---------------------
---------------------------#############------------------------
----------------------------------------------------------------

 To understand the diagram, think about a stereo signal over time.
 A normal signal would exist on most points on the graph. A perfect
 stereo white noise signal would look like a square diamond shape going 
 from C to -S (on the right) -C (bottom) to S back to C. Decreasing the
 volume of the stereo whitenoise signal would make the diamond smaller
 (Amplitude exists as distance from the center). A monophonic sinewave
 would exist only on the C axis, oscillating from C to -C (the bottom 
 of the graph). A sinewave on the Left speaker would oscillate only 
 on the L axis, from L to -L. (-L is the opposite part of the L axis,
 if you follow the L axis through the center to the opposite edge of
 the circle.
 
 To understand the Axes (plural of axis not axe) and Rotation, think of
 the sound being shifted to follow the axis. Specifically, the axis
 component of the sound is shifted to follow the axis modification.
 So, rotating the Center Axis 45 degrees to the right would merge it
 with the Right Channel axis, making all of the center part of the
 sound shift to the right speaker. However, the original stereo part
 of the sound stays the same. Conversely, rotating the stereo axis 45
 degrees merges it with the left channel (remember, the SAxis control
 is inverted, so 45 degrees is actually -45 degrees).
 
 Imagine the stereo whitenoise again as a diamond shaped-plot on the
 graph, but this time imagine only the outside edge, being a bounding
 box for the sound. If you connect the endpoints of the C and S axes,
 you will have this bounding box. If you rotate the Center or Stereo Axes,
 the points of the bounding box that lie on the C orS Axis will rotate
 around the circle. The bounding box shape will change accordingly (See 
 the figures below). Note that the rotated axes are not the "new"
 axes. The original axes still show the sound properties, but now of
 the "new" sound. The best way to learn is to experiment. Using a
 vector/phase scope helps too if you want to visualize things.
 Fortunately, the Zephod Scope effect can be used as such (rotate the
 display 45 degrees to the right, and swap the Left and Right channels).

 If all of that confuses you, then play with the machine. You'll understand
 what it does when you use it awhile =)                                 
                              
##########################################
####==-- SPECIAL CONSIDERATIONS --==######
##########################################

 Sounds that exist on the S axis but not (or barely) on the
 C axis are out of phase. This means that 1) when converting the
 sound to stereo, you will diminish or convert parts of the sound to 
 silence (especially bad for bass), 2) when listening to the sound in
 stereo, it may cause extra fatigue and uncomfortability (it is
 stressful for your ears and brain), 3) when listening to the sound
 in stereo, bass sections will be produced by the speakers but will be
 muted in airspace, since the left and right speakers will cancel each
 other out in the middle. 
 
 All of the controls are designed to preserve phase, or, not to make
 sounds out of phase. However, special conditions can occur. Rotating
 a sound that is purely on the left or right channels (which is
 unnatural as it is btw) can cause a sound to become out of phase.
 
 
##########################################
#####==-- REVISION HISTORY --==###########
##########################################

  1.0 - Initial Release
                                          
##########################################
##########==-- FIGURES --==###############
##########################################
                                                               
 Stereo whitenoise bounding box...
                                M
                                                               
                          XXXXXXXXXXXXXX                        
                       XXXXX  XXXXXX   XXXX                     
             L       XXXX    XX XX XX     XXX       R            
                   XXX      XX  XX  XX      XXX                 
                  XXX     XXX   XX    XX      XX                
                 XX      XX     XX     XX      XXX              
                XX      XX      XX      XX      XX              
               XX     XXX       XX        XX     XX             
              XXX    XX         XX         XX     XX            
              XX    XX          XX          XX     X            
              X   XXX           XX            XX   XX           
             XX  XX             XX             XX  XX           
             X  XX              XX              XX  X           
             XXX                XX                XXXX          
          S  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX          
             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX          
             X XX               XX                XXXX          
             XX XX              XX               XX X           
             XX  XX             XX             XX  XX           
              X   XXX           XX            XX   XX           
              XX    XX          XX          XXX   XX            
               XX    XX         XX         XX     XX            
               XX     XXX       XX        XX     XX             
                XX      XX      XX      XXX     XX              
                 XXX     XX     XX     XX      XX               
                  XXX     XX    XX    XX     XXX                
                    XXX     XX  XX  XXX     XXX                 
                     XXXX    XX XX XX    XXXX                   
                        XXXXX XXXXXX  XXXXX                     
                           XXXXXXXXXXXXX                        
                                                                
------------------------------------------------------------
                                          
 Stereo whitenoise rotated +22 degrees...
                                M
                                                               
                          XXXXXXXXXXXXXX                       
                       XXXXX    XX     XXXX                     
                     XXXX       XX      XXXXX                   
               L   XXX          XXXXXXXXX XXXXX    R            
                  XXX       XXXXXXX      XXXX XX    
                 XX   XXXXXX    XX      XX  X  XXX              
                XXXXXX          XX     XX   X   XX              
               XXXX             XX    XX    XX   XX             
              XXXXXXX           XX   XX      X    XX            
              XX X  XXX         XX   X       X     X            
              X  X     XX       XX  XX       XX    XX           
             XX  X       XX     XX XX         X    XX           
             X    X        XXX  XXXX          X     X           
             X    X          XXXXXX           X     XX          
        S    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX          
             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX          
             X     X           XXX XXX         X    XX          
             XX    X          X XX   XXX       XX   X           
             XX    XX        XX XX     XXX      X  XX           
              X     X       XX  XX       XXX    X  XX           
              XX    X      XX   XX         XXX  XXXX            
               XX   X     XX    XX            XX XXX            
               XX    X    X     XX             XXXX             
                XX   X   X      XX       XXXXXXXXX              
                 XXX X  XX      XX XXXXXXX     XX               
                  XXXXXXX    XXXXXXX         XXX                
                    XXXXXXXXXX  XX          XXX                 
                     XXXX       XX       XXXX                   
                        XXXXX   XX    XXXXX                     
                           XXXXXXXXXXXXX                        

------------------------------------------------------------

 Stereo white noise center axis rotated +22 degrees...
                                M
                                                                
                          XXXXXXXXXXXXXX                        
                       XXXXX    XX     XXXX                     
               L     XXXX       XX     XXXXXX     R             
                   XXX          XX  XXXXX XXXXX                 
                  XXX           XXXXX  XX  XX XX                
                 XX             XXX   XX    XX XXX              
                XX            XXXX    X      X  XX              
               XX           XXX XX   XX       X  XX             
              XXX         XXX   XX  XX        XX  XX            
              XX        XX      XX  X          XX  X            
              X      XXX        XX XX           XX XX           
             XX    XXX          XX X             XXXX           
             X   XXX            XXXX              X X           
             X XXX              XXX                XXX          
         S   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX          
             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX          
             XXX               XXX              XXX XX          
             XXXX              XXX            XXX   X           
             XX XX            XXXX          XXX     X           
              X  X            X XX        XXX      XX           
              XX  X          X  XX      XXX       XX            
               XX XX        XX  XX    XXX         XX            
               XX  XX       X   XX  XX           XX             
                XX  XX     XX   XXXX            XX              
                 XXX XX   XX   XXX             XX               
                  XXX XX  X  XXXXX           XXX                
                    XXXXXXXXXX  XX          XXX                 
                     XXXXXXX    XX       XXXX                   
                        XXXXX   XX    XXXXX                     
                           XXXXXXXXXXXXX                        
 


------------------------------------------------------------

                                          
##########################################
##########==-- CREDITS--==################
##########################################

- Coding by Mark Turner (Rymix).
- Thanx to Cyanphase for his awesome tutorial!
- Shouts to the #buzz crowd =) 
- Thanx to Waves for their great set of plugins.
                                          
##########################################
#########==-- DISCLAIMER--==##############
##########################################

StereBox (buzz plugin) is donationware. You are free to use this
plugin freely. Drop me an email if you find it useful =)
You may redistribute this plugin as long as credit to the
author is given. You may not sell or charge for this plugin in
any way, except for covering the cost of media. 

I cannot be held responsible if by some strange occurrance, using
my program causes your computer to crash or your country to be 
invaded and overthrown by wild lemmings. Please use at your own risk.
-------------------------------------------------------------
6.11.2001
